<?php
/**
 * Pages_AdminController
 * 
 * @author
 * @version 
 */
 
class Block_AdminController extends Zen_Controller_Admin
{
	public $columns = array(
                       array('name'=>'label','index'=>'label','label'=>'Название блока'),
                       array('name'=>'region','index'=>'region','label'=>'Регионы'),
                       array('name'=>'weight','index'=>'weight','label'=>'Вес','width'=>10),
                       array('name'=>'cache','index'=>'cache','label'=>'Кэш','formatter'=>'checkbox','width'=>30,'align'=>'center'),
                       array('name'=>'active','index'=>'active','label'=>'Опубликовано','formatter'=>'checkbox','width'=>30,'align'=>'center')
                     );
	
	
    public function indexAction() {
		$this->view->model=new Block_Model_Blocks();
		$this->view->columns = $this->columns;
	}
	
	public function formAction(){
		$this->_helper->jqgrid(
    		new Block_Model_Blocks(),
    		$this->_getAllParams(),
    		$this->columns,
    		new Block_Form_Block()
    	);
	}
}